window.onmouseover = function() {
    var userbox = document.getElementById('button');
    var menu = document.getElementsByClassName('dropdown-menu')[0];

    userbox.onmouseover = function() {
        menu.style.display = "block";
    }
    menu.onmouseout = function() {
        menu.style.display = "none";
    }
}